package com.zzptc.zzsgz.bdsjws.fragments;

import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.zzptc.zzsgz.bdsjws.MyApplication;
import com.zzptc.zzsgz.bdsjws.R;
import com.zzptc.zzsgz.bdsjws.adapter.ContactAdater;
import com.zzptc.zzsgz.bdsjws.fragments.base.BaseFragmentbase;
import com.zzptc.zzsgz.bdsjws.utils.MyUtils;
import com.zzptc.zzsgz.bdsjws.vo.Contact;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;

/**
 * Created by Administrator on 2017/6/5.
 */

public  class ShowAllContactFragment extends BaseFragmentbase {
    @BindView(R.id.rv_show_contact)
    RecyclerView rvShowcontact;
    List<Contact>list;
    @Override
    public int getXML() {
        return R.layout.show_all_contact_fragment;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initDate() {
     //   new  Thread(new Runnable() {
       //     @Override
       //     public void run() {
       //         list=MyUtils.getAllContacts();
       //     }
       // }).start();
      list= MyUtils.getAllContacts();
        System.out.println(list.size()+"}}}}}}}}}}}}}}}");
        ContactAdater contactAdater=new ContactAdater(list);
        rvShowcontact.setLayoutManager(new LinearLayoutManager(getActivity()));
        rvShowcontact.setAdapter(contactAdater);

    }
}
